package com.mvpandroiddemo.net;

import com.google.gson.JsonObject;
import com.mvpandroiddemo.base.BaseBean;
import com.mvpandroiddemo.register.RegisterBean;


import io.reactivex.Observable;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;

/**
 * @Description $description$
 * @Author owner
 * @CreateTime 2019/10/15 14:43
 **/
public interface NetServices {

    @POST(API.URL_REGISTER_POST)
    Observable<BaseBean<RegisterBean>> registerAccount(@Query("username") String userName,
                                                       @Query("password") String password,
                                                       @Query("repassword") String rePassword);

    @POST(API.URL_LOGIN_POST)
    Observable<BaseBean<RegisterBean>> login(@Query("username") String userName,
                                             @Query("password") String pwd);

    @GET("/lg/collect/list/{page}/json")
    Observable<BaseBean<JsonObject>> collectionArticle(@Path("page") int page);
}
